package com.xayy.mgt.service;

import cn.kawins.base.result.CheckResult;
import cn.kawins.mybatis.BaseService;
import com.github.pagehelper.PageInfo;
import com.xayy.core.antlr4.model.TelemetryVo;
import com.xayy.mgt.model.NodeTreeInfo;
import com.xayy.mgt.model.dto.NodeInfoDto;
import com.xayy.mgt.model.vo.NodeTreeCopyInfoVo;

import java.util.List;

/**
 * @author Nie
 * @version V1.0
 * @date 2023/8/14 15:16
 */
public interface NodeInfoService extends BaseService<NodeTreeInfo> {
    CheckResult<Object> getNodeTree(Long nodeId);

    CheckResult<Object> addOrUpdate(NodeTreeInfo nodeTreeInfo);

    CheckResult<Object> deleteTreeById(Long id);

    /**
     * 分页查询
     *
     * @param nodeInfoDto 查询参数
     * @return PageInfo<NodeInfo>
     */
    PageInfo<NodeTreeInfo> pageList(NodeInfoDto nodeInfoDto);

    CheckResult<Object> getNodeRelation(Long nodeId);

    CheckResult<Object> getNodeBaseInfo(Long nodeId);

    CheckResult<List<NodeTreeInfo>> getNodeInfoList(Long satId);

    CheckResult<Object> getInfo(Long nodeId);

    NodeTreeInfo getNode(Long nodeId);

    List<NodeTreeInfo> getByParentId(Long parentId);

    CheckResult<Object> deleteNodeInfo(Long nodeId);

    CheckResult<Object> timeAxisData(long parseLong, String sDate, String eDate);

    /**
     * 贝叶斯评估左侧树结构
     *
     * @return 树结构
     */
    CheckResult<Object> bayesLeftTree(Long nodeId,String nodeCode);

    CheckResult<List<Long>> getChildIds(Long satelliteId, Long nodeId);

    /**
     * 系统获取遥测统一接口，贝叶斯除外
     *
     * @param telemetryVo 入参对象
     * @return 结果日志
     */
    CheckResult<List<com.xayy.mgt.model.vo.TelemetryVo>> getTelemetry(TelemetryVo telemetryVo);

    /**
     * 获取卫星节点编码数组
     * @param nodeId 节点id
     * @return  List<List<String>>
     */
    List<List<String>> getNodeCodeArray(String nodeId);

    /**
     * 复制节点
     * @param nodeTreeCopyInfoVo 入参对象
     * @return CheckResult
     */
    CheckResult<Object> copyTreeAndNode(NodeTreeCopyInfoVo nodeTreeCopyInfoVo);

    /**
     * 获取所有子节点
     * @param parentNodeId 父节点id
     * @return List
     */
    List<NodeTreeInfo> getChildNode(Long parentNodeId);

    /**
     * 获取所有卫星列表
     * @return 卫星列表
     */
    List<NodeTreeInfo> getAllSatelliteList();
}
